﻿using hfcloud.Models;
using Microsoft.EntityFrameworkCore;

namespace hfcloud.Context;

public class MysqlDbContext:DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        base.OnConfiguring(optionsBuilder);
        var connectionString = "server=60.205.179.196;Port=3306;database=clouddb;User=root;Password=mysql_xN72bJ";
        optionsBuilder.UseMySQL(connectionString);
    }

    public DbSet<Account> account { get; set; }
    public DbSet<Device> device { get; set; }
}